home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
cenvid
/
controlc.bat
< prev
next >
Wrap
DOS Batch File
|
1995-01-30
|
821b
|
29 lines
@echo off
REM ***************************************************************
REM *** ControlC.bat - Demonstrate control-C handling using the ***
REM *** ver.1 ControlC.lib sample library. ***
REM ***************************************************************
CEnviD %0.bat
GOTO CENVI_EXIT
#include <ControlC.lib>
printf("Installing CTRL-C/CTRL-BREAK handler...");
InstallBreakHandler();
printf("\nPress any key to display, including Ctrl-C or Ctrl-Break.");
printf("\nExit by pressing ESCAPE...");
for( ; ; ) {
if ( gCtrlBreak ) {
printf("\nCONTRL-C OR CTRL-BREAK WERE PRESSED!!!!!\n");
gCtrlBreak = False;
} else if ( kbhit() ) {
printf("%c",key=getch());
if ( key == '\033' )
break;
}
}
RemoveBreakHandler();
:CENVI_EXIT